# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Marc Moody <marc.r.moody at gmail dot com>
# Contributor: Dinh Bowman <dinh at vagueindustries dot com>

pkgname=rapid-photo-downloader
pkgver=0.9.34
pkgrel=2
pkgdesc="Photo and video downloader"
arch=('any')
url="https://www.damonlynch.net/rapid/"
license=('GPL3')
depends=('desktop-file-utils' 'gstreamer' 'hicolor-icon-theme' 'libgexiv2' 'libnotify' 'python-arrow'
         'perl-image-exiftool' 'python-colour' 'python-dateutil' 'python-easygui' 'python-gobject'
         'python-gphoto2' 'python-psutil' 'python-pymediainfo' 'python-pyqt5' 'python-pyzmq'
         'python-requests' 'python-setuptools' 'python-sortedcontainers' 'python-babel'
         'python-tornado' 'python-pyxdg' 'qt5-imageformats' 'udisks2' 'python-tenacity' 'qt5-svg'
         'python-show-in-file-manager')
makedepends=('intltool' 'ifuse')
optdepends=('ifuse: for iOS devices')
changelog=$pkgname.changelog
source=(https://launchpad.net/rapid/pyqt/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz{,.asc}
        https://github.com/damonlynch/rapid-photo-downloader/commit/c3b62f04.patch)
sha256sums=('2455ac84a8a51ed91500edaad1afb50f7adff2a437f4105360ac16311efb279e'
            'SKIP'
            'b606c23e74ff443a5793b2692864b743a68edde5845acc3f3325c3cf2d95f345')
validpgpkeys=('E26048A9F4A803B91CB1BD648005B1F36970BE28') # Damon Lynch <damonlynch@gmail.com>

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../c3b62f04.patch # Fix build with setuptools 66
}
	
build() {
  cd "${srcdir}"/$pkgname-$pkgver

  python setup.py build
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver

  python setup.py install --root="${pkgdir}" --optimize=1
}
